﻿namespace Soul.IdentityServer.Models
{
    public class OpenIdConnectResources
    {
        public static IdentityResource OpenId => new IdentityResource(OpenIdConnectScopes.OpenId)
        {
            AllowedClaimTypes =
            {
                OpenIdConnectClaimTypes.Subject
            }
        };
        
        public static IdentityResource OpenIdProfile => new IdentityResource(OpenIdConnectScopes.OpenIdProfile)
        {
            AllowedClaimTypes =
            {
                OpenIdConnectClaimTypes.Photo,
                OpenIdConnectClaimTypes.NickName,
            }
        };

        public static IdentityResource Phone => new IdentityResource(OpenIdConnectScopes.Phone)
        {
            AllowedClaimTypes =
            {
                OpenIdConnectClaimTypes.Phone
            }
        };

        public static IdentityResource Email => new IdentityResource(OpenIdConnectScopes.Email)
        {
            AllowedClaimTypes =
            {
                OpenIdConnectClaimTypes.Email
            }
        };

        public static IdentityResource Address => new IdentityResource(OpenIdConnectScopes.Address)
        {
            AllowedClaimTypes =
            {
                OpenIdConnectClaimTypes.Address
            }
        };

        public static IdentityResource OfflineAccess => new IdentityResource(OpenIdConnectScopes.OfflineAccess)
        {

        };
    }
}
